package jju.edu.mvptest.model;

import java.util.ArrayList;

/**
 * Created by Administrator on 2016/12/1.
 */

public class Phonefactory {
    private ArrayList<Phone> olist = new ArrayList<>();

    public void addPhone(Phone phone){
        olist.add(phone);
    }
    public void removePhone(Phone phone){
        olist.remove(phone);
    }
    public void removePhone(int index){
        olist.remove(index);
    }
    public void createPhone(String id,double price){
        Phone phone = new Phone(id,price);
        olist.add(phone);
    }
    public ArrayList<Phone> getOlist(){
        return  olist;
    }

    public int getCount(){
        return  olist.size();
    }

}
